Change “Password expires after:” value for all users

Hello All!

My company has changed the password policy for all employees to allow 90 days, instead of 30, between required password resets. I’d like adapt this new password policy to all Doors users, ca. 175. I’m not really familiar with DXL, but is it possible to handle the “Password expires after:” value in the “Manage Users…” dialogue box via a DXL script? How would a DXL script look to set the “Password expires after:” value from 30 to 90 days for each Doors user?
I’d appreciate your help.

Thanks in advance,
Frank
pinkfloydfan - Thu Apr 07 09:04:32 EDT 2011

Re: Change “Password expires after:” value for all users
llandale - Thu Apr 07 11:28:50 EDT 2011

I actually have a program that does exactly this but I don't think I can share it; but I can strip out the guts:

int   iLifetime_Desired = 90   // days
User usr
string ErrMess, NameUser
loadDirectory()
for usr in userList do
{  NameUser    = usr.name
   ensureUserRecordLoaded(usr)
   noError()
   setUser(usr, passwordLifetime, iLifetime_Desired)
   ErrMess      = lastError()
   if (!null ErrMess)  //
   then warningBox("Error setting Password Lifetime for '" NameUser "':\n" ErrMess)
   else saveUserRecord(usr)
}     // end for users in the database


Not sure about the loadDirectory()/ensureUserRecordLoaded/saveUserRecord parts; these work but perhaps there is a better way.

 

 

  • Louie

 

 

Re: Change “Password expires after:” value for all users
pinkfloydfan - Mon Apr 11 02:21:14 EDT 2011

llandale - Thu Apr 07 11:28:50 EDT 2011

I actually have a program that does exactly this but I don't think I can share it; but I can strip out the guts:

int   iLifetime_Desired = 90   // days
User usr
string ErrMess, NameUser
loadDirectory()
for usr in userList do
{  NameUser    = usr.name
   ensureUserRecordLoaded(usr)
   noError()
   setUser(usr, passwordLifetime, iLifetime_Desired)
   ErrMess      = lastError()
   if (!null ErrMess)  //
   then warningBox("Error setting Password Lifetime for '" NameUser "':\n" ErrMess)
   else saveUserRecord(usr)
}     // end for users in the database


Not sure about the loadDirectory()/ensureUserRecordLoaded/saveUserRecord parts; these work but perhaps there is a better way.

 

 

  • Louie

 

 

Hello Louie,

you made my day! Thank you very much! Your script works fine and saved me from a lot of monotonous work.

Regards,
Frank